#include "stdafx.h"
#include "elementbound.h"


int CElementBound::Right(){return left+width;}
int CElementBound::Bottom(){return top+height;}

void CElementBound::TransformX(int x){left+= x;}
void CElementBound::TransformY(int y){top+= y;}
void CElementBound::Transform(int x,int y){TransformX(x);TransformY(y);}

CElementBound::CElementBound()
{
	left = 0;
	top = 0;
	width = 0;
	height = 0;
}

CElementBound::CElementBound(const CElementBound& obj)
{
	*this = obj;
}

CElementBound& CElementBound::operator = (const CElementBound& obj)
{
	left = obj.left;
	top = obj.top;
	width = obj.width;
	height = obj.height;

	return *this;

}

CRect CElementBound::ToBound()
{
	return CRect(left,top,Right(),Bottom());
}


 
 